#ifndef _PROCESSLIST_H
#define _PROCESSLIST_H

#include "Date.h"
#include "Time.h"
#include "Event.h"
#include "Additional.h"

#include <iostream>
#include <sstream>
#include <string>
#include <string.h>
#include <vector>
#include <cstdlib>
#include <stack>
#include <cassert>


using namespace std;

class ProcessList
{
public:

	ProcessList();

	bool addEvent(vector<Date>& currentList, struct Task currentTask);//, string& statusMessage);
	bool editEvent (vector<Date>& currentList, vector<Event>& displayList , struct Task currentTask);//, string);
	bool deleteEvent (vector<Date>& currentList, vector<Event>& displayList,struct Task currentTask);//, string);
	bool showEvents (vector<Date>& currentList, vector<Event>& displayList ,struct Task currentTask);
	bool markAsDone (vector<Date>& currentList, vector<Event>& displayList, struct Task currentTask); 
	string undoCommand (vector<Date>& currentList);
	string showFreeTime (vector<Date>& currentList, vector<Event>& displayList,struct Task currentTask);
	string getEventDetailsId(vector<Date> currentList,vector<Event> displayList, struct Task currentTask);
	~ProcessList(void);

private:
	//bool hasSlashes(string);
	//bool isValidDate(Date date, Date currentDate);
	//bool isMonth(string month);
	//int whichMonth(string month);
	//Date dateStringToObject(string date, Date currentDate);
	//Date setDateObject(int day, int month, int year);

	//Time timeStringToObject(string time);
	/*bool checkOverallTime(string, Time[]);
	int findHyphen(string);
	int findColonOrPeriod(string);
	int findAmPm(string);
	int hasAmPm(vector<string>);
	bool isValidTime(Time time);
	string formatTime(Time time);*/
	

	bool isValidAdd(struct Task);
	
	string toLower(string);

	bool equalsIgnoreCase(string, string);
	//vector<string> tokenize(string);
	//vector<string> removeSlash(string);
	bool hasString(string, string);
	bool checkIfClash(vector<Event> eventList, Time[]);

	void fillDates(vector<Date>&, int);
	string generateId(Date currentDate);
	string trim(string);

	int getTimeArrayIndex(Time eventTime);
	string arrayIndexToString(int index);

	//vector<string> tokenizeTime(string);
	stack<string> commandOrder;
	stack<Event> eventOrder;
};

#endif
